package net.zigin.nhi.could.waste.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import net.zigin.nhi.could.waste.annotation.EpiResponseFilter;
import net.zigin.nhi.could.waste.annotation.EpiResponseFilters;
import net.zigin.nhi.could.waste.service.SysDictionService;
import net.zigin.nhi.could.waste.vo.JsonForResult;
import net.zigin.nhi.could.waste.vo.SysDictionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * SysDiction控制器类
 * @ClassName: SysDictionController
 * @author mgw1986
 * @date 2021-9-20 22:06:06
 * @version V1.0
 */
@Api(tags = "字典管理")
@RestController
@RequestMapping("/sysDiction")
public class SysDictionController extends BaseController {
	@Autowired
	private SysDictionService sysDictionService;

	@GetMapping("/getListByType")
	@ApiOperation("员工详情")
	@ApiImplicitParam(name = "type", value = "字典类型", required = true, dataType = "String")
	@EpiResponseFilters({
			@EpiResponseFilter(exclude = "icon,id")
	})
	public JsonForResult<List<SysDictionVo>> getListByType(String type){
		List<SysDictionVo> list = sysDictionService.getListByType(type);
		return JsonForResult.<List<SysDictionVo>>builder().data(list).success(true).build();
	}

}
